<!--
 * Copyright TLR Team, Inc. All Rights Reserved.
-->
<div class="modal fade" id="DeviceModal" tabindex="-1" role="dialog" aria-labelledby="DeviceModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="DeviceModalLabel">
                    <i class="fa fa-bank fa-fw hella-icon-offset"></i>设备
                </h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    <div class="row">
                        <div class="form-group">
                            <label class="control-label col-xs-4">设备标识</label>
                            <div class="col-xs-6">
                                <input type="text" class="form-control" ng-model="device.devicemac">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="form-group">
                            <label class="control-label col-xs-4">设备备注名</label>
                            <div class="col-xs-6">
                                <input type="text" class="form-control" ng-model="device.bindname">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="form-group">
                            <label class="control-label col-xs-4">设备类型</label>
                            <div class="col-xs-6">
                                <select class="form-control" ng-model="device.devicetype" ng-options="type.value as type.name for type in DEVICE.types"></select>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="form-group">
                            <label class="control-label col-xs-4">访问密码</label>
                            <div class="col-xs-6">
                                <input type="password" class="form-control" ng-model="device.devicepwd">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="form-group">
                            <label class="control-label col-xs-4">设备状态</label>
                            <div class="col-xs-6" ng-if='device.devicetype !== 2'>
                                <select class="form-control" ng-model="device.status" ng-options="status.value as status.name for status in DEVICE.statuses"></select>
                            </div>
                            <div class="col-xs-6" ng-if='device.devicetype === 2'>
                                <select class="form-control" ng-model="device.status" ng-options="status.value as status.name for status in DEVICE.car_statuses"></select>
                            </div>
                        </div>
                    </div>
                    <div class="row" ng-if="subview === 'linkcard'">
                        <div class="form-group">
                            <label class="control-label col-xs-4">设备绑定用户</label>
                            <div class="col-xs-6">
                                <input type="text" class="form-control" ng-model="device.binduser">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="form-group">
                            <label class="control-label col-xs-4">设备地址</label>
                            <div class="col-xs-6">
                                <input type="text" class="form-control" ng-model="device.address">
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="onDeviceSave()">保存
                </button>
            </div>
        </div>
    </div>
</div>
